import http from '@/utils/http.js'

export const login = (data) => {
    return http({
        method: 'post',
        url: `/user/user/web/login`,
        data
    })
}

// 获取用户的语音通话 token
export const getUserToken = (params) => {
    return http({
        method: 'get',
        url: `/live/web/im/user/get/token`,
        params
    })
}

// 直播带货-查询商品列表
export const getLiveGoodsList = (params) => {
    return http({
        method: 'get',
        url: '/spcolumn/web/live/query/goods/list',
        params
    })
}
// 直播带货-商品排序置顶
export const liveGoodSort = (data) => {
    return http({
        method: 'POST',
        url: '/spcolumn/manager/live/goods/put/first',
        data
    })
}
// 查询自己已经添加商品
export const getSelfAddGoods = (params) => {
    return http({
        method: 'get',
        url: '/spcolumn/web/live/goods/list',
        params
    })
}
// 添加直播带货商品
export const addLiveGoods = (data) => {
    return http({
        method: 'POST',
        url: '/spcolumn/web/live/goods/add',
        data
    })
}
// 移除商品
export const removeLiveGoods = (data) => {
    return http({
        method: 'POST',
        url: '/spcolumn/manager/live/goods/del',
        data
    })
}